<?php

use Yansongda\Pay\Pay;
return [
    'alipay' => [
        'default' => [
            // 支付宝分配的 app_id
            'app_id' => '',
            // 应用私钥
            'app_secret_cert'=>'',
            // 应用公钥证书 路径
            'app_public_cert_path' => storage_path(env('AppPublicCert_path','')),
            // 支付宝公钥证书 路径
            'alipay_public_cert_path' => storage_path(env('AlipayPublicCert_path','')),
            // 支付宝根证书 路径
            'alipay_root_cert_path' => storage_path(env('AlipayRootCert_path','')),
            'return_url' => 'www.baidu.com',
            'notify_url' => env('APP_URL').'/api/pay/ali/notify',
            'mode' => Pay::MODE_NORMAL,
        ],
    ],
    'wechat' => [
        'default' => [
            // 公众号 的 app_id
            'mp_app_id' => env('PAY_MP_APP_ID',''),
            // 小程序 的 app_id
            'mini_app_id' => env('MINI_APP_ID',''),
            // app 的 app_id
            'app_id' => env('PAY_APP_ID',''),
            // 商户号
            'mch_id' => env('WECHAT_MAC_ID',''),
            // 合单 app_id
            'combine_app_id' => '',
            // 合单商户号
            'combine_mch_id' => '',
            // 商户秘钥
            'mch_secret_key' => env('MCH_SECRET_KEY',''),
            // 商户私钥
            'mch_secret_cert' => storage_path(env('MchSecretCert','')),
            // 商户公钥证书路径
            'mch_public_cert_path' =>  storage_path(env('MchPublicCertPath','')),
            // 微信公钥证书路径
            'wechat_public_cert_path' => [
                '165E230B655B2E43592E6619F22901A744BFA49F' =>storage_path('app/cert/wx/wechatPublicKey.crt'),
            ],
            'notify_url' => env('WECHAT_NOTIFY_URL',''),
            'mode' => Pay::MODE_NORMAL,
        ],
    ],
    'http' => [ // optional
        'timeout' => 5.0,
        'connect_timeout' => 5.0,
        // 更多配置项请参考 [Guzzle](https://guzzle-cn.readthedocs.io/zh_CN/latest/request-options.html)
    ],
    // optional，默认 warning；日志路径为：sys_get_temp_dir().'/logs/yansongda.pay.log'
    'logger' => [
        'enable' => true,
        'file' => storage_path('logs/alipay.log'),
        'level' => 'debug',
        'type' => 'single', // optional, 可选 daily.
        'max_file' => 30,
    ],
];
